import random

def generateCaptcha(count):
    string = ''
    for i in range(0, count):
        random_int = random.randint(65, 90) # A ~ Z ascii值： 65 ~ 90
        random_char = chr(random_int)
        string = string + random_char
    return string

code = generateCaptcha(6)
print(code)